package org.joa.examples.philosophers;

import org.joa.actor.Actor;
import org.joa.actor.exception.RemoteException;
import org.joa.examples.philosophers.generated.Philosopher;

public class ChopstickActor extends Actor {
    private static final long serialVersionUID = 1L;

    private Philosopher holder;

    public void setHolder(Philosopher philosopher) throws RemoteException {
        if (philosopher == null) {
            holder = null;
            return;
        }

        this.holder = philosopher;
    }

    public Philosopher getHolder() throws RemoteException {
        return holder;
    }
}
